<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title></title>
    <style type="text/css">
        html,body{
            height: 100%;
            margin: 0;
            /*background-color: #EEF5DB;*/
            background-color: #ffffff;
        }
        body{
            max-width: 375px;
            margin: 0 auto;
        }
        .content{
            box-sizing: border-box;
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            padding: 24px;
        }
        .tips{
            margin-top: 30%;
        }
        .title{
            font-size: 24px;
            font-weight: bold;
            line-height: 20px;
            color: #333;
            margin-top: 8px;
            margin-bottom: 0;
        }
        .sub-title{
            margin-top: 20px;
            font-size: 18px;
            line-height: 30px;
            color: #666;
            text-align: center;
        }
        .btn{
            margin-top: auto;
            width: 100%;
            font-size: 18px;
            color: #fff;
            border: 0;
            outline: 0;
            line-height: 50px;
            background: #1378F4;
            border-radius: 25px;
            text-align: center;
        }

        a{
            display: none;
        }
        .btn-read{
            display: block;
            width: 192px;
            height: 44px;
            line-height: 44px;
            margin: 24px auto 0;
            text-align: center;
            border-radius: 22px;
            font-size: 16px;
            color: #ffffff;
            background: #EB6A48;
        }
    </style>
</head>
<body>

<div class="content">
    <img style="width: 80%;margin-left: 0%;margin-bottom: 30px;" src="/static/imgs/ydtu.png" alt="">
    <p style="margin-top: 4px;font-size: 16px;color: #000;">正在加载全文，后续内容更精彩～～</p>
    <p style="margin-top: 4px;font-size: 14px;color: #999999;font_">出现权限提示时请选择允许</p>
    <p class="sub-title" id="wechatShow" style="display: none;">若小说没有自动打开：<br>点击右上角“ … ”<br>选择在“浏览器中打开”继续阅读</p>
    <a href="" id="reOpenBtn" class="btn-read">继续阅读</a>
</div>

<script type="text/javascript" src="//statres.quickapp.cn/quickapp/js/routerinline.min.js"></script>

<script>
    var token = '{$token}';
    var adtype = '{$adtype}';
    var request_id = '{$request_id}';
    var req_id = '{$req_id}';
    var package = '{$package}';
    var path = 'pages/read';
    var params = {
        token: token,
        adtype: adtype,
        request_id: request_id,
        req_id: req_id,
    };
    var url = "hap://app/" + package + "/" + path + '?' + stringify(params);
    function stringify(data) {
        if (!data || typeof data !== 'object') {
            throw new Error('parameter need an object');
        }
        var str = '';
        for (var key in data) {
            if (data.hasOwnProperty(key)) {
                var value = data[key];
                str += key + '=' + value + '&';
            }
        }
        return str.substring(0, str.length - 1);
    }


    function jump() {
        window.location.href = url;
        setTimeout(function () {
            appRouter(package, path, params)
        }, 1000)
    }

    var reOpenBtn = document.getElementById('reOpenBtn');
    reOpenBtn.addEventListener('click', function () {
        jump();
    });
</script>
</body>
</html>